
#ifndef _BMPIMAGE_H_
#define _BMPIMAGE_H_
#include"bmpheader.h"
typedef struct{

    BMP_Header header;
    unsigned int data_size;
    unsigned int width;
    unsigned int height;
    unsigned int bites_per_pixel;
    unsigned char * data;
}BMP_Image;

#define MAGIC_VALUE 0X4D42
#define BITS_PER_PIXEL  24  // 每个像素有多少位
#define NUM_PLANE   1
#define COMPRESSION 0
#define BITS_PER_BYTE   8

// -打开bmp文件
BMP_Image * BMP_open(const char * filename);

int BMP_save(const BMP_Image * image,const char * filename);

void BMP_destroy(BMP_Image * image);

// -判断四原色的顺序
void BMP_order(BMP_Image * img,int cls);

void BMP_color_mirror(BMP_Image * img);
// -颜色均衡
void BMP_equalize(BMP_Image * img);

#endif  //!_BMPIMAGE_H_